package com.labManage.dao;

import com.labManage.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleDao {
    List<Role> selectAllRoleLimit(@Param("startIndex")Integer startIndex,
                                  @Param("limit")Integer limit,
                                  @Param("condition")Role condition);

    List<Role> selectRoleByUserId(Long userId);

    int updateRoleInfoById(Role role);

    List<Role> selectAllRole();

    List<Role> selectAllRoleByUserId(Long userId);

    Role selectRoleByRoleName(String roleName);

    int insertRole(Role role);

    int deleteRoleByRoleId(Long roleId);

    long selectRoleNum();
}
